$(document).ready(function(){

    var newsDetail=$(".news-detail");
    var institution_name=window.localStorage.getItem("institution_name")
    //newsDetail.html('<div class="news-detail-header"><h2></h2></div><div class="news-detail-body"></div>');
    var data={
        bankName :institution_name
    };

        $.ajax({
            type:"POST",
            url:'http://localhost:8888/bank/getAllBankInformation',
            data: data,
            success:function (result) {
                //console.log(result.data);
                if(result.meta.success){
                    //console.log(result.meta.message);
                    if(result.data!=null){
                        var val=result.data["governmentPolicies List"][0];
                        newsDetail.append('<div class="news-detail-header"><h2>'+val.bankName+'</h2></div><div class="news-detail-body"></div>');
                        $(".news-detail-body").html(val.description);
                    }else{
                        alert(result.meta.message);
                    }

                }
            },
            error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest.status);
                alert(XMLHttpRequest.readyState);
                alert(textStatus);
            }
        })


});